<?php
namespace app\common\model;

use think\Model;

class Article extends Model
{
    static $statusList = [1=>'未审核',2=>'已审核',3=>'已发布',-1=>'发布失败'];


    public function getStatusTextAttr($value,$data){
        return self::$statusList[$data['status']];
    }

    public function cases(){
        return $this->hasOne('Cases','id','case_id');
    }

    public function website(){
        return $this->hasOne('Website','id','website_id');
    }



}